namespace DotNetDalTest.AbstractEntities
{
    using System;
    using System.Collections.Generic;
    using System.Data.SqlClient;
    using DotNetDal.Core;
    using DotNetDal.Core.Data;
    using DotNetDal.Core.StructureAttributes;


    [TableAttribute(Schema = "Person")]
    public partial class AbstractvStateProvinceCountryRegion : DALView
    {

        private static Entities.vStateProvinceCountryRegion instance = new Entities.vStateProvinceCountryRegion();

        [FieldAttribute()]
        public int StateProvinceID
        {
            get
            {
                return ((int)(this["StateProvinceID"]));
            }
            set
            {
                this["StateProvinceID"] = value;
            }
        }

        [FieldAttribute()]
        public string StateProvinceCode
        {
            get
            {
                return ((string)(this["StateProvinceCode"]));
            }
            set
            {
                this["StateProvinceCode"] = value;
            }
        }

        [FieldAttribute()]
        public bool IsOnlyStateProvinceFlag
        {
            get
            {
                return ((bool)(this["IsOnlyStateProvinceFlag"]));
            }
            set
            {
                this["IsOnlyStateProvinceFlag"] = value;
            }
        }

        [FieldAttribute()]
        public string StateProvinceName
        {
            get
            {
                return ((string)(this["StateProvinceName"]));
            }
            set
            {
                this["StateProvinceName"] = value;
            }
        }

        [FieldAttribute()]
        public int TerritoryID
        {
            get
            {
                return ((int)(this["TerritoryID"]));
            }
            set
            {
                this["TerritoryID"] = value;
            }
        }

        [FieldAttribute()]
        public string CountryRegionCode
        {
            get
            {
                return ((string)(this["CountryRegionCode"]));
            }
            set
            {
                this["CountryRegionCode"] = value;
            }
        }

        [FieldAttribute()]
        public string CountryRegionName
        {
            get
            {
                return ((string)(this["CountryRegionName"]));
            }
            set
            {
                this["CountryRegionName"] = value;
            }
        }

        public static Entities.vStateProvinceCountryRegion[] GetFromSql(string sql)
        {
            return DALRecord.GetFromSql<Entities.vStateProvinceCountryRegion>(sql);
        }

        public static Entities.vStateProvinceCountryRegion[] GetFromSql(string sql, params SqlParameter[] sqlParams)
        {
            return DALRecord.GetFromSql<Entities.vStateProvinceCountryRegion>(sql, sqlParams);
        }
    }
}
